
package com.itheima.wms.factory;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class CodeWorker {
    private static CodeFactory codeFactory;


    @Autowired
    public void setCodeFactory(CodeFactory codeFactory) {
        CodeWorker.codeFactory = codeFactory;
    }

    public static String nextCode(String name) {
        return codeFactory.nextCode(name);
    }
}
